package net.ge.mosq.service;

import java.util.Collection;
import java.util.List;

import net.ge.mosq.jdo.entity.AccountItem;
import net.ge.mosq.jdo.entity.CodeName;

/**
 * @author noodles.wumu@gmail.com
 * @since 2012/06/27 17:49:46
 * @version 1.0
 */
public interface AccountService {

	AccountItem createAnAccount(AccountItem anAccountItem);

	Collection<AccountItem> createManyAccount(
			Collection<AccountItem> anAccountItemList);

	void deleteAnAccount(AccountItem aAccountItem);

	void updateAnAccount(AccountItem anAccountItem)
			throws IllegalArgumentException;

	AccountItem getAnAccountByKey(Long id);

	List<AccountItem> getAllAccountWithTransInfo(String email);
	List<AccountItem> getAllAccountWithTransInfoFlat(String email);

	List<AccountItem> getAccountByParentKeyWithTransInfo(Long parentid,
			String email);

	void addCommonItems(List<AccountItem> items);
	
	String getAccountNameWithAllParentById(Long id);
	
	List<CodeName> getAccountNameWithAllParent(String email);
}
